package com.bootdo.lvyou.dao;

import com.bootdo.lvyou.domain.LvyouMember;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 用户表
 * @author lujingqian
 * @email 965858129@qq.com
 * @date 2019-10-14 14:35:49
 */
@Mapper
public interface LvyouMemberDao {

	LvyouMember get(Long id);
	
	List<LvyouMember> list(Map<String,Object> map);
	
	int count(Map<String,Object> map);
	
	int save(LvyouMember lvyouMember);
	
	int update(LvyouMember lvyouMember);
	
	int remove(Long id);
	
	int batchRemove(Long[] ids);

	@Select("select * from me_lvyou_member where openid=#{openid}")
    LvyouMember getByOpenid(@Param("openid") String openid);

	@Select("select id,openid,nickname,sex,age,city_id,city_name,mobile,avatar,password,create_time,is_show from me_lvyou_member where mobile=#{mobile}")
	LvyouMember getByMobile(@Param("mobile") String mobile);


	Map getByIdGetNamePhoto(Long memberId);
}
